//
// Created by calm on 2023-12-26.
// 1 2 3 Z  i I l L 1
#include "stdio.h"

int main(){
    int arr[11][11]={0};
    int n=11;
    int times = n+n-1;
    int data=1;
    for (int i = 0; i < times; ++i) {
        if(i<n){
            for(int row=i;row>=0;row--){
                arr[row][i-row]=data++;
            }
        }else{
            //i=4  row= 3  2   1
            for(int row=n-1;row>i-n;row--){
                arr[row][i-row]=data++;
            }
        }

    }
    int tips=0;
    int count = 4;
    for(int r=0;r<n;r++){
        for(int c=0;c<n;c++){
            tips++;
            printf("%*d",count,arr[r][c]);
            if(tips%n==0){
                printf("\n");
            }
        }
    }
    return 0;
}

